package server.command.ecs;

import java.util.ArrayList;

import app_kvServer.KVServer;
import app_kvServer.ServerMetadata;
import server.command.client.ClientInputHandler;
import server.command.client.ICommand;
import utils.IKeyValueStorage;
import utils.SynchronizedAccessStorageUtil;
import common.messages.KVMessage.StatusType;

public class CommandUpdateRange implements ICommand {
	private KVServer server;
	private String rangeStart;
	private String rangeEnd;
	
	public CommandUpdateRange(KVServer server, String rangeStart, String rangeEnd) {
		this.server = server;
		this.rangeStart = rangeStart;
		this.rangeEnd = rangeEnd;
	}
	
	@Override
	public String execute() {
		server.setRangeStart(rangeStart);
		server.setRangeEnd(rangeEnd);
		return ClientInputHandler.composeClientResponse(StatusType.METADATA_UPDATED, " ", ""); 
	}
}
